home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / CHIP Haziran 2001.iso / prog / share / 17 / dings_e.exe / Compiler / Include / NB30.H < prev    next >
C/C++ Source or Header  |  1999-11-07  |  4KB  |  183 lines

  1. #ifndef _NB30_H
  2. #define _NB30_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #define NCBNAMSZ 16
  7. #define MAX_LANA 254
  8. #define NAME_FLAGS_MASK 0x87
  9. #define GROUP_NAME 0x80
  10. #define UNIQUE_NAME 0x00
  11. #define REGISTERING 0x00
  12. #define REGISTERED 0x04
  13. #define DEREGISTERED 0x05
  14. #define DUPLICATE 0x06
  15. #define DUPLICATE_DEREG 0x07
  16. #define LISTEN_OUTSTANDING 0x01
  17. #define CALL_PENDING 0x02
  18. #define SESSION_ESTABLISHED 0x03
  19. #define HANGUP_PENDING 0x04
  20. #define HANGUP_COMPLETE 0x05
  21. #define SESSION_ABORTED 0x06
  22. #define ALL_TRANSPORTS "M\0\0\0"
  23. #define MS_NBF "MNBF"
  24. #define NCBCALL 0x10
  25. #define NCBLISTEN 0x11
  26. #define NCBHANGUP 0x12
  27. #define NCBSEND 0x14
  28. #define NCBRECV 0x15
  29. #define NCBRECVANY 0x16
  30. #define NCBCHAINSEND 0x17
  31. #define NCBDGSEND 0x20
  32. #define NCBDGRECV 0x21
  33. #define NCBDGSENDBC 0x22
  34. #define NCBDGRECVBC 0x23
  35. #define NCBADDNAME 0x30
  36. #define NCBDELNAME 0x31
  37. #define NCBRESET 0x32
  38. #define NCBASTAT 0x33
  39. #define NCBSSTAT 0x34
  40. #define NCBCANCEL 0x35
  41. #define NCBADDGRNAME 0x36
  42. #define NCBENUM 0x37
  43. #define NCBUNLINK 0x70
  44. #define NCBSENDNA 0x71
  45. #define NCBCHAINSENDNA 0x72
  46. #define NCBLANSTALERT 0x73
  47. #define NCBACTION 0x77
  48. #define NCBFINDNAME 0x78
  49. #define NCBTRACE 0x79
  50. #define ASYNCH 0x80
  51. #define NRC_GOODRET 0x00
  52. #define NRC_BUFLEN 0x01
  53. #define NRC_ILLCMD 0x03
  54. #define NRC_CMDTMO 0x05
  55. #define NRC_INCOMP 0x06
  56. #define NRC_BADDR 0x07
  57. #define NRC_SNUMOUT 0x08
  58. #define NRC_NORES 0x09
  59. #define NRC_SCLOSED 0x0a
  60. #define NRC_CMDCAN 0x0b
  61. #define NRC_DUPNAME 0x0d
  62. #define NRC_NAMTFUL 0x0e
  63. #define NRC_ACTSES 0x0f
  64. #define NRC_LOCTFUL 0x11
  65. #define NRC_REMTFUL 0x12
  66. #define NRC_ILLNN 0x13
  67. #define NRC_NOCALL 0x14
  68. #define NRC_NOWILD 0x15
  69. #define NRC_INUSE 0x16
  70. #define NRC_NAMERR 0x17
  71. #define NRC_SABORT 0x18
  72. #define NRC_NAMCONF 0x19
  73. #define NRC_IFBUSY 0x21
  74. #define NRC_TOOMANY 0x22
  75. #define NRC_BRIDGE 0x23
  76. #define NRC_CANOCCR 0x24
  77. #define NRC_CANCEL 0x26
  78. #define NRC_DUPENV 0x30
  79. #define NRC_ENVNOTDEF 0x34
  80. #define NRC_OSRESNOTAV 0x35
  81. #define NRC_MAXAPPS 0x36
  82. #define NRC_NOSAPS 0x37
  83. #define NRC_NORESOURCES 0x38
  84. #define NRC_INVADDRESS 0x39
  85. #define NRC_INVDDID 0x3B
  86. #define NRC_LOCKFAIL 0x3C
  87. #define NRC_OPENERR 0x3f
  88. #define NRC_SYSTEM 0x40
  89. #define NRC_PENDING 0xff
  90. #define NCB_POST void CALLBACK
  91. typedef struct _ACTION_HEADER {
  92.     ULONG transport_id;
  93.     USHORT action_code;
  94.     USHORT reserved;
  95. } ACTION_HEADER,*PACTION_HEADER;
  96. typedef struct _ADAPTER_STATUS {
  97.     UCHAR adapter_address[6];
  98.     UCHAR rev_major;
  99.     UCHAR reserved0;
  100.     UCHAR adapter_type;
  101.     UCHAR rev_minor;
  102.     WORD duration;
  103.     WORD frmr_recv;
  104.     WORD frmr_xmit;
  105.     WORD iframe_recv_err;
  106.     WORD xmit_aborts;
  107.     DWORD xmit_success;
  108.     DWORD recv_success;
  109.     WORD iframe_xmit_err;
  110.     WORD recv_buff_unavail;
  111.     WORD t1_timeouts;
  112.     WORD ti_timeouts;
  113.     DWORD reserved1;
  114.     WORD free_ncbs;
  115.     WORD max_cfg_ncbs;
  116.     WORD max_ncbs;
  117.     WORD xmit_buf_unavail;
  118.     WORD max_dgram_size;
  119.     WORD pending_sess;
  120.     WORD max_cfg_sess;
  121.     WORD max_sess;
  122.     WORD max_sess_pkt_size;
  123.     WORD name_count;
  124. } ADAPTER_STATUS,*PADAPTER_STATUS;
  125. typedef struct _FIND_NAME_BUFFER {
  126.     UCHAR length;
  127.     UCHAR access_control;
  128.     UCHAR frame_control;
  129.     UCHAR destination_addr[6];
  130.     UCHAR source_addr[6];
  131.     UCHAR routing_info[18];
  132. } FIND_NAME_BUFFER,*PFIND_NAME_BUFFER;
  133. typedef struct _FIND_NAME_HEADER {
  134.     WORD node_count;
  135.     UCHAR reserved;
  136.     UCHAR unique_group;
  137. } FIND_NAME_HEADER,*PFIND_NAME_HEADER;
  138. typedef struct _LANA_ENUM {
  139.     UCHAR length;
  140.     UCHAR lana[MAX_LANA+1];
  141. } LANA_ENUM,*PLANA_ENUM;
  142. typedef struct _NAME_BUFFER {
  143.     UCHAR name[NCBNAMSZ];
  144.     UCHAR name_num;
  145.     UCHAR name_flags;
  146. } NAME_BUFFER,*PNAME_BUFFER;
  147. typedef struct _NCB {
  148.     UCHAR ncb_command;
  149.     UCHAR ncb_retcode;
  150.     UCHAR ncb_lsn;
  151.     UCHAR ncb_num;
  152.     PUCHAR ncb_buffer;
  153.     WORD ncb_length;
  154.     UCHAR ncb_callname[NCBNAMSZ];
  155.     UCHAR ncb_name[NCBNAMSZ];
  156.     UCHAR ncb_rto;
  157.     UCHAR ncb_sto;
  158.     void (CALLBACK *ncb_post)(struct _NCB*);
  159.     UCHAR ncb_lana_num;
  160.     UCHAR ncb_cmd_cplt;
  161.     UCHAR ncb_reserve[10];
  162.     HANDLE ncb_event;
  163. } NCB,*PNCB;
  164. typedef struct _SESSION_BUFFER {
  165.     UCHAR lsn;
  166.     UCHAR state;
  167.     UCHAR local_name[NCBNAMSZ];
  168.     UCHAR remote_name[NCBNAMSZ];
  169.     UCHAR rcvs_outstanding;
  170.     UCHAR sends_outstanding;
  171. } SESSION_BUFFER,*PSESSION_BUFFER;
  172. typedef struct _SESSION_HEADER {
  173.     UCHAR sess_name;
  174.     UCHAR num_sess;
  175.     UCHAR rcv_dg_outstanding;
  176.     UCHAR rcv_any_outstanding;
  177. } SESSION_HEADER,*PSESSION_HEADER;
  178. UCHAR WINAPI Netbios(PNCB);
  179. #ifdef __cplusplus
  180. }
  181. #endif
  182. #endif
  183.